package com.intelligentcar.springboot.controller;

import com.intelligentcar.springboot.bean.Driverinfo;
import com.intelligentcar.springboot.service.DriverinfoServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
public class DriverinfoController {
    @Autowired
    private DriverinfoServer driverinfoServerImpl;
    //查询所有司机
    @RequestMapping("/Driverinfo")
    @ResponseBody
    public Map Driverinfo() {
        Map map = new HashMap();
        List<Driverinfo> list = driverinfoServerImpl.Driverinfo();
        map.put("list",list );
        return map;
    }
}
